/**
 * 商品
 */
angular.module('mall.goods.impl',[
])

.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
    $stateProvider

        //商品列表页
        .state('goods.goods', {
            url : '',
            templateUrl : cmt_mall_templateprefix+'/good/goods.html',
            controller : 'ImplGoodsController'
        })
}])

.controller('ImplGoodsController', ['$scope',
    function($scope) {
        initLeftCss(0);
        setInitStoreBodyHei();
        hide_this(".background_hide");

        angular.element(document).ready(function () {
            scroll('#goods_info','#goods_list','.tab_content');//滚动监听
            scro("#goods_info");

        });

        $scope.addshopcart = function(){//加入购物车
            ShopcartService.addgoods($scope.shopid,$scope.chosed_order.cid,$scope.chosed_order.goodsid);
            alert("添加成功");
        }

        $scope.lister = function(id){
            clickGo(id);
        }
    }
])
;
